package jp.co.sn.mml.pojo.tdnyu;

import jp.co.sn.mml.pojo.tmsks.Tmsks;

public class TdnyuId implements java.io.Serializable { 

	//請求先コード
	private Tmsks sksCd;
	//行番号
	private Long seq;

	/** default constructor */
	public TdnyuId(){

	}

	/** full constructor */
	public TdnyuId(Tmsks sksCd,Long seq){
		this.sksCd = sksCd;
		this.seq = seq;
	}

	//Property accessors
	public Tmsks getSksCd(){
		return this.sksCd;
	}

	public void setSksCd(Tmsks sksCd){
		this.sksCd=sksCd;
	}

	public Long getSeq(){
		return this.seq;
	}

	public void setSeq(Long seq){
		this.seq=seq;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TdnyuId))
			return false;

		TdnyuId castOther = (TdnyuId) other;

		return ((this.getSksCd() ==  castOther.getSksCd())
				||(this.getSksCd()!=null && castOther.getSksCd() !=null 
					&& castOther.getSksCd() !=null 
					&& this.getSksCd().equals(castOther.getSksCd())))
			&& ((this.getSeq() ==  castOther.getSeq())
				||(this.getSeq()!=null && castOther.getSeq() !=null 
					&& castOther.getSeq() !=null 
					&& this.getSeq().equals(castOther.getSeq())))
;	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getSksCd() == null ? 0 : this.getSksCd().hashCode());
		result = 37 * result
				+ (getSeq() == null ? 0 : this.getSeq().hashCode());
		return result;
	}

}